package cn.edu.scau.dormitory_management_system.module.examine.dao;

import cn.edu.scau.dormitory_management_system.module.examine.entity.CheckinApplicationEntity;
import cn.edu.scau.dormitory_management_system.module.examine.entity.VO.CheckinApplicationVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CheckinApplicationDao extends BaseMapper<CheckinApplicationEntity> {
    IPage<CheckinApplicationVO> listCheckinApplicationByUserId(Page<CheckinApplicationVO> page, Integer userId);

    IPage<CheckinApplicationVO> listCheckinApplications(Page<CheckinApplicationVO> page, Integer status, Integer deptId, String name);

    @Delete("delete from tb_checkin_application where id=#{id}")
    boolean retreatApplication(Integer id);
}
